package com.grad.webstudy.vo;

import com.fasterxml.jackson.annotation.JsonFormat;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * @Description:
 * @Author: zjf
 * @Date: 2020/2/6 15:23.
 */
public class CourseVo implements Serializable {

    private Integer id;

    private String className;

    private Float score;

    private String teacher;

    private String introduction;

    private Integer studyNumber;

    private String type;

    private String typeIds;

    private Integer scoreUser;

    private String level;

    private Integer levelCode;

    private String coverPath;

    private Integer status;


    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createTime;

    private String baseKnowledge;

    private String learn;


    private Integer progress;


    private List<CourseChapterVo> courseChapterVos;


    public CourseVo() {
    }

    public CourseVo(Builder builder) {
        this.id = builder.id;
        this.className = builder.className;
        this.score = builder.score;
        this.teacher = builder.teacher;
        this.introduction = builder.introduction;
        this.studyNumber = builder.studyNumber;
        this.type = builder.type;
        this.scoreUser = builder.scoreUser;
        this.level = builder.level;
        this.coverPath = builder.coverPath;
        this.status = builder.status;
        this.courseChapterVos = builder.courseChapterVos;
        this.createTime = builder.createTime;
        this.baseKnowledge = builder.baseKnowledge;
        this.learn = builder.learn;
        this.typeIds = builder.typeIds;
        this.levelCode = builder.levelCode;
        this.progress = builder.progress;
    }

    @Override
    public String toString() {
        return "CourseVo{" +
                "id=" + id +
                ", className='" + className + '\'' +
                ", score=" + score +
                ", teacher='" + teacher + '\'' +
                ", introduction='" + introduction + '\'' +
                ", studyNumber=" + studyNumber +
                ", type='" + type + '\'' +
                ", typeIds='" + typeIds + '\'' +
                ", scoreUser=" + scoreUser +
                ", level='" + level + '\'' +
                ", levelCode=" + levelCode +
                ", coverPath='" + coverPath + '\'' +
                ", status=" + status +
                ", createTime=" + createTime +
                ", baseKnowledge='" + baseKnowledge + '\'' +
                ", learn='" + learn + '\'' +
                ", progress=" + progress +
                ", courseChapterVos=" + courseChapterVos +
                '}';
    }

    public Integer getProgress() {
        return progress;
    }

    public void setProgress(Integer progress) {
        this.progress = progress;
    }

    public Integer getLevelCode() {
        return levelCode;
    }

    public void setLevelCode(Integer levelCode) {
        this.levelCode = levelCode;
    }

    public String getTypeIds() {
        return typeIds;
    }

    public void setTypeIds(String typeIds) {
        this.typeIds = typeIds;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public String getBaseKnowledge() {
        return baseKnowledge;
    }

    public void setBaseKnowledge(String baseKnowledge) {
        this.baseKnowledge = baseKnowledge;
    }

    public String getLearn() {
        return learn;
    }

    public void setLearn(String learn) {
        this.learn = learn;
    }

    public List<CourseChapterVo> getCourseChapterVos() {
        return courseChapterVos;
    }

    public CourseVo setCourseChapterVos(List<CourseChapterVo> courseChapterVos) {
        this.courseChapterVos = courseChapterVos;
        return this;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getClassName() {
        return className;
    }

    public void setClassName(String className) {
        this.className = className;
    }

    public Float getScore() {
        return score;
    }

    public void setScore(Float score) {
        this.score = score;
    }

    public String getTeacher() {
        return teacher;
    }

    public void setTeacher(String teacher) {
        this.teacher = teacher;
    }

    public String getIntroduction() {
        return introduction;
    }

    public void setIntroduction(String introduction) {
        this.introduction = introduction;
    }

    public Integer getStudyNumber() {
        return studyNumber;
    }

    public void setStudyNumber(Integer studyNumber) {
        this.studyNumber = studyNumber;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public Integer getScoreUser() {
        return scoreUser;
    }

    public void setScoreUser(Integer scoreUser) {
        this.scoreUser = scoreUser;
    }

    public String getLevel() {
        return level;
    }

    public void setLevel(String level) {
        this.level = level;
    }

    public String getCoverPath() {
        return coverPath;
    }

    public void setCoverPath(String coverPath) {
        this.coverPath = coverPath;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }


    public static class Builder {
        private Integer id;

        private String className;

        private Float score;

        private String teacher;

        private String introduction;

        private Integer studyNumber;

        private String type;

        private String typeIds;

        private Integer levelCode;

        private Integer scoreUser;

        private String level;

        private String coverPath;

        private Integer status;

        @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
        private Date createTime;

        private String baseKnowledge;

        private String learn;

        private Integer progress;


        private List<CourseChapterVo> courseChapterVos;


        public Builder setProgress(Integer progress) {
            this.progress = progress;
            return this;
        }

        public Builder setLevelCode(Integer levelCode) {
            this.levelCode = levelCode;
            return this;
        }

        public Builder setTypeIds(String typeIds) {
            this.typeIds = typeIds;
            return this;
        }

        public Builder setId(Integer id) {
            this.id = id;
            return this;
        }

        public Builder setClassName(String className) {
            this.className = className;
            return this;
        }

        public Builder setScore(Float score) {
            this.score = score;
            return this;
        }

        public Builder setTeacher(String teacher) {
            this.teacher = teacher;
            return this;
        }

        public Builder setIntroduction(String introduction) {
            this.introduction = introduction;
            return this;
        }

        public Builder setStudyNumber(Integer studyNumber) {
            this.studyNumber = studyNumber;
            return this;
        }

        public Builder setType(String type) {
            this.type = type;
            return this;
        }

        public Builder setScoreUser(Integer scoreUser) {
            this.scoreUser = scoreUser;
            return this;
        }

        public Builder setLevel(String level) {
            this.level = level;
            return this;
        }

        public Builder setCoverPath(String coverPath) {
            this.coverPath = coverPath;
            return this;
        }

        public Builder setStatus(Integer status) {
            this.status = status;
            return this;
        }

        public Builder setCourseChapterVos(List<CourseChapterVo> courseChapterVos) {
            this.courseChapterVos = courseChapterVos;
            return this;
        }

        public Builder setCreateTime(Date createTime) {
            this.createTime = createTime;
            return this;
        }

        public Builder setBaseKnowledge(String baseKnowledge) {
            this.baseKnowledge = baseKnowledge;
            return this;
        }

        public Builder setLearn(String learn) {
            this.learn = learn;
            return this;
        }

        public CourseVo build() {
            return new CourseVo(this);
        }
    }

}
